Python - ビデオ処理。方法: 1) ビデオのピクセル値を変更し (つまり、ピクセル効果)、2) すべてのピクセルの情報を取得します。 (Python - video processing. How to: 1) change pixels value in videos (ie pixelated effect), and then 2) retrieve every single pixel's information)


問題の説明

Python ‑ ビデオ処理。方法: 1) ビデオのピクセル値を変更し (つまり、ピクセル効果)、2) すべてのピクセルの情報を取得します。 (Python ‑ video processing. How to: 1) change pixels value in videos (ie pixelated effect), and then 2) retrieve every single pixel's information)

この質問は、実際の科学プロジェクトに関連しています。1. ビデオは、黒い背景面に対して白い移動オブジェクトを媒体として作成されます。最終結果は白黒出力に近くなりますが、ビデオを実際のデュアル カラー チャネル ビデオ (黒と白のピクセルのみを表示) にレンダリングする必要もあります。ノイズ (光の干渉によって生じる無関係な白いピクセル) を削除/削減することも役立つと思います 2. その後、ピクセル効果を得るためにピクセル値を変更する必要があります 3。まさにこの時点で、すべてのフレームからすべてのピクセル値を取得する必要があります。これらのマトリックスに対して計算計算を実行する必要があるため、おそらくマトリックス形式で配置されます。

例を示します。


リファレンスソリューション

方法 1:

# You could store it in a list like this:

frame1 = [.01110000, .01111001] # and so on. Because an int can't start on zero, I made these decilams

To change the first item in this list do the following

frame1[0] = .01110011 # This will be the new value and the current list looks like this:

frame1 = [.01110011, .01111001]

To retrieve information about every element in the list simply use a for loop

n = ‑1
for element in frame1:
n += 1
element = frame1[n]
print(element)
</code></pre>

(by Enzo realFishSam)

リファレンスドキュメント

  1. Python ‑ video processing. How to: 1) change pixels value in videos (ie pixelated effect), and then 2) retrieve every single pixel's information (CC BY‑SA 2.5/3.0/4.0)

#video-processing #Python #OpenCV #pixel #data-analysis






関連する質問

MATLAB がビデオからイメージ フレームを返す (MATLAB return image frames from video)

av_write_trailerが失敗するのはなぜですか? (Why does av_write_trailer fails?)

バイナリ イメージをビデオとして表示する Matlab (Matlab displaying binary images as video)

PHP ビデオ チャット サード パーティ アプリケーション (PHP video chat third party application)

WPFでビデオを生成して描画する高速な方法は何ですか? (What is a fast way to generate and draw video in WPF?)

大きなファイルの処理中に、Windows サービスを介して ffmpeg.exe を実行すると完了に失敗する (Running ffmpeg.exe through windows service fails to complete while dealing with large files)

Python3.6 は cv2 処理されたビデオにオーディオを追加します (Python3.6 add audio to cv2 processed video)

iOS で AVAssetReaderTrackOutput を介してサンプル バッファを取得中にオーディオが失われましたか? (Audio missing while getting sample buffers through AVAssetReaderTrackOutput in iOS?)

フレーム内の背景検出 (background detection in frames)

OpenCV Pythonで近くの輪郭をグループ化する方法は? - 横断検出 (How to group nearby contours in OpenCV Python? - Zebra Crossing detection)

Python - ビデオ処理。方法: 1) ビデオのピクセル値を変更し (つまり、ピクセル効果)、2) すべてのピクセルの情報を取得します。 (Python - video processing. How to: 1) change pixels value in videos (ie pixelated effect), and then 2) retrieve every single pixel's information)

プロジェクトの問題、画像処理についてアドバイスを求める (Project problem, looking for advice about image processing)







コメント